package com.math;

public class NewBubbleSort {
    public static void main(String[] args) {
        int[] str = {4, 6, 9, 0, 5, 1};

        for (int i = 0; i < str.length - 1; i++) {
            for (int j = 0; j < str.length - 1 - i; j++) {
                if (str[j] < str[j + 1]) {
                    int temp = str[j];
                    str[j] = str[j + 1];
                    str[j + 1] = temp;
                }
            }
        }

        for (int i = 0; i < str.length; i++) {
            System.out.println(str[i]);
        }
    }
}
